package com.yun.zf.app.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yun.zf.common.app.domain.ZfFollow;
import com.yun.zf.common.app.dto.follow.FollowInfoDto;
import com.yun.zf.common.app.model.home.FollowMo;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * <p>
 * 房源关注表 服务类
 * </p>
 *
 * @author cj
 * @since 2021-05-27
 */
public interface ZfFollowService extends IService<ZfFollow> {

    /**
     * 新增关注
     * @param followMo
     * @return
     */
    public int addFollow(FollowMo followMo);

    @Cacheable( cacheNames = {"follow"},key = "#userId+'_'+#type")
    public List<FollowInfoDto> myFollow(Long userId, int type);


    public  int delFollow(Long userId ,List<Long> horcIds,int type);

    int hasFollow(Long userId ,Long horcId);

}
